﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SmartWMS.Common.ResponseOutput;
using SmartWMS.Server.SystemSets.ResetPwdServices.Dto;
using SmartWMS.Server.SystemSets.ResetPwdServices;

namespace SmartWMS.API.Controllers.SystemSet
{
    /// <summary>
    /// 重置密码
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    [ApiExplorerSettings(GroupName = "XTong")]

    public class ResetController : ControllerBase
    {
        private readonly IResetService _resetService;

        public ResetController(IResetService resetService)
        {
            _resetService = resetService;
        }

        /// <summary>
        /// 重置密码
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public Task<Response<bool>> ResetPassword(StaffPwdInput input)
        {
            var result = _resetService.ResetPassword(input);

            return result;
        }
    }
}
